<template>
	<view class="page">
		<topVue title="消息中心"></topVue>
		<view class="item margin30 padding30" v-for="(item, index) in list" :key="index">
			<view class="content">{{ item.content }}</view>
			<view class="flex align-center margin20">
				<image src="/static/index/date.png" style="width: 30rpx; height: 30rpx;"></image>
				<text style="color: #666666; padding-left: 10rpx; line-height: 1;">{{ item.createTime }}</text>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data(){
			return {
				list: []
			}
		},
		async onLoad() {
			await this.getMessage()
		},
		methods: {
			// 获取公告
			async getMessage(){
				const res = await this.$request("/front/index/contentList")
				if(res.code===0) this.list = res.data
			},
		}
	}
</script>

<style lang="less" scoped>
	.item {
		width: 690rpx;
		background: rgba(237, 244, 255, 0.8);
		border-radius: 20rpx;
		.content {
			font-weight: 500;
			font-size: 30rpx;
			color: #04094C;
			line-height: 1.4;
		}
	}
</style>